package SellCar.controller;


import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import SellCar.pojo.Buy;
import SellCar.service.BuyBiz;
import SellCar.service.impl.BuyBizImpl;

@Controller("buyController")
public class BuyController{
	@Autowired
	@Qualifier("buyBizImpl")
	private BuyBizImpl biz;
	
	ModelAndView mav = new ModelAndView();
	@RequestMapping(value="buyCar.html")
	public ModelAndView buyCar(){
		List<Buy> buyList = biz.getBuyList();
		mav.addObject("buyList", buyList);
		mav.setViewName("showBuy");
		return mav;
		
	}

}
